package org.flint92.springboot.servlet.listener;

import javax.servlet.ServletContext;
import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;
import javax.servlet.annotation.WebListener;

/**
 * @author flint92
 */
@WebListener
public class MyServletRequestListener implements ServletRequestListener {

    @Override
    public void requestInitialized(ServletRequestEvent sre) {

        ServletContext ctx = sre.getServletContext();

        ctx.log("servlet request initialized");
    }

    @Override
    public void requestDestroyed(ServletRequestEvent sre) {

        ServletContext ctx = sre.getServletContext();

        ctx.log("servlet request destroyed");

    }
}
